package task18;

public class Computer2 {
    static Keyboard keyboard=new Keyboard();
    static Mouse mouse=new Mouse();
    static Microphone microphone=new Microphone();


    public static void on() {
        keyboard.open();
        mouse.open();
        microphone.open();
        System.out.println("计算机启动了");
    }

    public static void off() {
        keyboard.close();
        mouse.close();
        microphone.close();
        System.out.println("计算机关闭了");
    }
}
